const requestUrl = require('../../../config').requestUrl
//API 操作
let serviceData = require('../../../datas/service.js')

Page({

  /**
   * 页面的初始数据
   */
  data: {

    qiyeid:'',
    gzhArr: [] //企业列表
    
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

    let qiyeid = options.qiyeid || this.data.qiyeid;

    this.setData({
      qiyeid: qiyeid,
    })

    this.GeGzhArrCount(qiyeid);

  },



  //获取公众号列表
  GeGzhArrCount: function (qiyeid) {

    var self = this

    let param = {
      API_URL: requestUrl + "interUserByQiyeOrGzh.action",
      data: {
        "qiyeid":qiyeid,
        "organName": wx.getStorageSync("OrganName")
      }
    };

    console.log(param);
    serviceData.result(param).then(data => {

      console.log('接口GeGzhArrCount请求成功');
      console.log(data);

      this.setData({
        gzhArr: data.data,
      })

    }).catch(e => {
      console.log(e)
    })
  },

   
});

 